using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using Granite.Modeling;

namespace LeadTracker.Entities
{
	public class LeadComment : ChangeTrackingModelBase
	{

		public LeadComment() {
			IsNew = true;
			Checkpoint();
		}

		public LeadComment(IDictionary<string, object> fields)
		{
			Load(fields);
		}

		public bool IsNew
		{
			get { return GetOrDefault<bool>("IsNew"); }
			set { SetValue("IsNew", value); }
		}

		public int LeadCommentKey
		{
			get { return GetOrDefault<int>("LeadCommentKey"); }
			set { SetValue("LeadCommentKey", value); }
		}

		[Required]
		public int LeadKey
		{
			get { return GetOrDefault<int>("LeadKey"); }
			set { SetValue("LeadKey", value); }
		}

        [Required]
        [DataType(DataType.MultilineText)]
        public string Comment
		{
			get { return GetOrDefault<string>("Comment"); }
			set { SetValue("Comment", value); }
		}

	}
}
